const path = require("path");
const resolve = dir => path.join(__dirname, dir); // 路径

module.exports = {
  css: {
    loaderOptions: {
      less: {
        // If you are using less-loader@5 please spread the lessOptions to options directly
        modifyVars: {
          "primary-color": "#1DA57A",
          "link-color": "#1DA57A",
          "border-radius-base": "2px"
        },
        javascriptEnabled: true
      } // 开启后 antd 样式 可以引用.less文件
    }
  },
  configureWebpack: {
    name: process.env.VUE_APP_BASE_NAME,
    resolve: {
      alias: {
        "@": resolve("src")
      }
    }
  },
  devServer: {
    port: 8081,
    https: false,
    proxy: {
      "/api": {
        target: process.env.VUE_APP_BASE_API,
        // target: 'http://localhost:8888',
        changeOrigin: true
        // logLevel: 'debug',
        /*pathRewrite: {
          '^/api': ''
        }*/
      }
    }
  }
};
